package com.example.campuslink.commen.db.userNumber

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update

@Dao
interface UserNumberDao {
    @Query("SELECT MAX(id) FROM user_number_table")
    fun getMaxId(): Int?

    @Insert
    fun insertUserNumber(userNumberTable: UserNumberTable)

    @Query("SELECT * FROM user_number_table WHERE telNumber = :telNumber")
    fun getUserNumber(telNumber: String): UserNumberTable?


    @Query("delete from user_number_table where telNumber = :telNumber")
    fun deleteUserNumber(telNumber: String)

    @Update
    fun updateUserNumber(userNumberTable: UserNumberTable)
}